﻿using WorkflowCore.Interface;

namespace MyMES.Read.API.Extensions
{
    //public class ConfigureExtensions UseWorkflow(this IApplicationBuilder app)
    //{
    //    var host = app.ApplicationServices.GetService<IWorkflowHost>();
    //    //host.RegisterWorkflow<EdcWorkflow>();
    //    host.RegisterWorkflow<LeaveApprovalWorkflow, LeaveApprovalData>();
    //    host.RegisterWorkflow<MultiLevelApprovalWorkflow, ApprovalRequest>();
    //    host.Start();

    //    var appLifetime = app.ApplicationServices.GetService<IApplicationLifetime>();
    //    appLifetime.ApplicationStopping.Register(() =>
    //    {
    //        host.Stop();
    //    });

    //    return app;
    //}
}
